package cn.lsh.comparator;

import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.WritableComparable;
import org.apache.hadoop.io.WritableComparator;

/**
 * 自定义分组比较器，让同一文件的数据分到一组
 */
public class HotCommentGroup2Comparator extends WritableComparator {

	public HotCommentGroup2Comparator() {
		super(Text.class, true);
	}

	@Override
	public int compare(WritableComparable a, WritableComparable b) {
		return HotComment2Comparator.compareId(a, b);
	}
}
